import requests
from config import url, headers_web


class ProjectIndicatorConfig:
    def __int__(self):
        self.url = url
        self.headers = headers_web

    @classmethod
    def post_indicatorsConfig(cls, url: str, headers=headers_web, params=None,json=None):
        """
        Summary:新增或更新项目量表配置
        Description:1.云课堂教室端-项目量表配置使用
        :param url:
        :param headers:
        :param params:
        :param json:
        :return:
        """
        url = url + "/teachingApi/v1/courseproject/indicators/config"
        r = requests.post(url=url, headers=headers, params=params,json=json)
        return r

    @classmethod
    def post_indicatorsConfigPage(cls, url: str, headers=headers_web, params=None, json=None):
        """
        Summary:分页获取老师项目量表配置信息
        Description:1.云课堂教室端-项目量表配置使用
        :param url:
        :param headers:
        :param params:
        :param json:
        :return:
        """
        url = url + "/teachingApi/v1/courseproject/indicators/config/page"
        r = requests.post(url=url, headers=headers, params=params, json=json)
        return r